package src.ocrs.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.event.dom.client.ClickEvent;
import com.google.gwt.event.dom.client.ClickHandler;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.DeckPanel;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.user.client.ui.Label;
import com.google.gwt.user.client.ui.Image;
import com.google.gwt.user.client.ui.SimplePanel;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.TabPanel;

/**
 * Entry point classes define <code>onModuleLoad()</code>.
 */
public class odinsFace implements EntryPoint {
	public void onModuleLoad() {
		//panel setup
		RootPanel rootPanel = RootPanel.get();
		rootPanel.setStyleName("body");
		
		VerticalPanel bigPanel = new VerticalPanel();
		bigPanel.setStyleName("gwt-VerticalPanel-ocrs");
		rootPanel.add(bigPanel, 0, 0);
		bigPanel.setSize("496px", "347px");
		
		TabPanel pages = new TabPanel();
		pages.setStyleName("gwt-TabPanelBottom");
		
		//set up header and body
		Label lblOdinsFistHeader = new Label("ODIN'S FIST COURSE REGISTRATION SYSTEM");
		lblOdinsFistHeader.setStyleName("gwt-Label-ocrsHeader");
		bigPanel.add(lblOdinsFistHeader);
		lblOdinsFistHeader.setSize("489px", "55px");
		
		bigPanel.add(pages); 
		pages.setSize("493px", "288px");
		
		//create intro screen
		Image image = new Image("440px-Odin55.jpg");
		pages.add(image, "INTRO", false);
		image.setSize("405px", "215px");
		
		//add 2nd page
		MainPage studentMain = new MainPage();
		studentMain.setHeight("110px");
		//studentMain.setHeight("194px");
		pages.add(studentMain, "Home");

		
		//Image odinImage = new Image("440px-Odin55.jpg");
		//simplePanel.setWidget(odinImage);
		//odinImage.setSize("440", "200");
		/*odinImage.addClickHandler(new ClickHandler() {
			public void onClick(ClickEvent event) {
				//TODO link to functional homepage
			}
		});*
		simplePanel.setWidget(odinImage);
		pages.add(odinImage, "Intro");
		odinImage.setSize("103", "254px");
		
		//add 2nd page
		MainPage studentMain = new MainPage();
		studentMain.setHeight("194px");
		pages.add(studentMain, "Home");
		
		//make tabs clickable
	*/
		
	}
}
